Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit 9671325c506cc4b7a64b6bb6ea42fddf2e2fa74c


Parents : cdf2a21
Author : Ivan <ivan@quad4.io>
Signature : Signature validation error
Date : 2026-05-09T19:01:12-05:00

fix(identity_context): guard inbound stamp cost comparison against non-int values

Changes

1 files changed, 20 insertions(+), 0 deletions(-)


Diff

diff --git a/meshchatx/src/backend/identity_context.py b/meshchatx/src/backend/identity_context.py
index 2407fe44..f2f5cce2 100644
--- a/meshchatx/src/backend/identity_context.py
+++ b/meshchatx/src/backend/identity_context.py
@@ -217,6 +217,14 @@ class IdentityContext:
# Register LXMF delivery identity
inbound_stamp_cost = self.config.lxmf_inbound_stamp_cost.get()
+ # Enforce max stamp cost when block strangers is enabled on startup
+ if (
+ self.config.block_all_from_strangers.get()
+ and isinstance(inbound_stamp_cost, int)
+ and inbound_stamp_cost < 254
+ ):
+ inbound_stamp_cost = 254
+ self.config.lxmf_inbound_stamp_cost.set(254)
self.local_lxmf_destination = self.message_router.register_delivery_identity(
identity=self.identity,
display_name=self.config.display_name.get(),
@@ -413,6 +421,18 @@ class IdentityContext:
thread.daemon = True
thread.start()
+ # start background thread for LXMF flood protection cooldown
+ thread = threading.Thread(
+ target=asyncio.run,
+ args=(
+ self.app.lxmf_flood_protection_cooldown_loop(
+ self.session_id, context=self
+ ),
+ ),
+ )
+ thread.daemon = True
+ thread.start()
+
# start background thread for auto propagation node selection
thread = threading.Thread(
target=asyncio.run,


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────